package fly_weight_mode

import "fmt"

type IgoChessman struct {
	Color string
}

func (f *IgoChessman) Display(coordinate Coordinate) {
	fmt.Printf("棋子颜色: %s,棋子坐标:x = %d,y = %d\n", f.Color, coordinate.X, coordinate.Y)
}

func NewIgoChessman(t string) *IgoChessman {
	switch t {
	case "white":
		return &IgoChessman{Color: "white"}
	case "black":
		return &IgoChessman{Color: "black"}
	default:
		return nil
	}
}
